﻿<UserControl x:Class="AccountHelper.UserControls.MoneyDetailPopup"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    DataContext="{Binding MoneyDetailPopupVM,Source={StaticResource Locator}}"
    d:DesignHeight="260" d:DesignWidth="400">

    <UserControl.Resources>
        <ControlTemplate x:Key="CloseButtonTPL" TargetType="Button">
            <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                <Image Source="/Images/Close.png"></Image>
            </Grid>
        </ControlTemplate>
        <Storyboard x:Name="DetailShow">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.5"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.5"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="DetailHide">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.5"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0.5"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent" RenderTransformOrigin="0.5,0.5">
        <Grid.RenderTransform>
            <CompositeTransform/>
        </Grid.RenderTransform>
        <Border Name="MainBorder" Width="400" Height="260" BorderThickness="8" BorderBrush="{StaticResource PhoneForegroundBrush}" Background="{StaticResource PhoneAccentBrush}" Opacity="0.9" CornerRadius="10">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="60"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="60"/>
                    <RowDefinition/>
                    <RowDefinition Height="40"/>
                </Grid.RowDefinitions>
                <TextBlock Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Name="SolarDateTextBlock" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="32" Text="{Binding SelectMoney.ChargeDate}"/>
                <Border Grid.Column="1" Grid.Row="0" BorderThickness="3" BorderBrush="{StaticResource PhoneForegroundBrush}" Background="{StaticResource PhoneBackgroundBrush}" CornerRadius="30" Margin="2">
                    <Button Name="CloseButton" HorizontalAlignment="Center" VerticalAlignment="Center" Content="Close" Template="{StaticResource CloseButtonTPL}"/>
                </Border>
                <Border Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="{StaticResource PhoneForegroundBrush}" Background="{StaticResource PhoneAccentBrush}">
                    <ScrollViewer Margin="0,51,0,0">
                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
                            <TextBlock x:Name="AgendaTextBlock" Text="SampleAgendaTextBlock" Foreground="{StaticResource PhoneAccentBrush}"/>
                            <TextBlock x:Name="LunarDateTextBlock" Text="SampleLunarDate"/>
                        </StackPanel>
                    </ScrollViewer>
                </Border>
                <HyperlinkButton Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Name="addNewFeeLink" HorizontalAlignment="Center" VerticalAlignment="Center" Content="Add New Charge"/>
            </Grid>
        </Border>
    </Grid>
</UserControl>
